<template>
	<view>
		<view class="topBox pt40">
			<view class="fs40 fw-500 color-f ml30">
				<text class="mr20">{{orderD.status| orderStatus}}</text>
				<u-icon name="arrow-right" size="24"></u-icon>
			</view>
		</view>	
		<view class="pl30 pr30">
			<!-- 地址盒子 -->
			<view class="bg-f radius16 padding30 fs24" style="margin-top: -180rpx;">
				<view class=" flex">
					<image src="@/static/image/my/myMap1.png" class="w30 h30 mr20"></image>
					<text>{{orderD.address.region}}</text>
				</view>
				<view class="fw-700 fs26 mt14">{{orderD.address.region}}-{{orderD.address.addr}}</view>
				<view class="mt10">{{orderD.address.name}}  {{orderD.address.phone}}</view>
			</view>
			<!-- 地址盒子 -->
			<!-- 商品信息盒子 -->
			<view class="padding30  bg-f mt20 radius16 fs24">
				<view class="pb20 u-border-bottom">
					<view class="flex">
						<image :src="orderD.goods.img" class="w160 h160 radius10 mr30"></image>
						<view class="u-line-1 flex1 flex row-column row-between">
							<view class="u-line-1 fs28 fw-700">{{orderD.goods.name}}</view>
							<view class="flex row-between">
								<text class="fw-600 color6">¥{{orderD.goods.price}}</text>
								<text>x{{orderD.num}}</text>
							</view>
						</view>
					</view>
					<view class="fs26 fw-700 flex row-right mt20">实付款¥ {{orderD.total_amount}}</view>
				</view>
				<!-- <view class="flex row-right mt16">
					<u-button  shape="circle" size="mini" class="mr30" style="width: 144rpx;height: 56rpx; font-size: 24rpx;">取消订单</u-button>
					<u-button type="primary" shape="circle" size="mini" style="width: 144rpx;height: 56rpx; font-size: 24rpx;">去支付</u-button>
					<u-button type="primary" shape="circle" size="mini" style="width: 144rpx;height: 56rpx; font-size: 24rpx;border: 2rpx solid #FF6B35;background-color: #FFFFFF; color:#FF6B35 ;" v-show="false">查看详情</u-button>
					<u-button type="primary" shape="circle" size="mini" style="width: 144rpx;height: 56rpx; font-size: 24rpx;" v-show="false">确认收货</u-button>
				</view> -->
			</view>
			<!-- 商品信息盒子 -->
			
			<view class="mt20 radius16 bg-f fs24 color9 padding30">
				<view class="">
					<text class="">订单编号：</text>
					<text @click="copy">
						<text class="mr32">{{orderD.order_sn}}</text>
						<text class="cuIcon-copy"></text>
					</text>
				</view>
				<view class="mt30">
					<text class="mr30">下单时间：{{orderD.create_time}}</text>
				</view>
			<!-- 	<view class="mt30">
					<text class="mr30">发货时间：2020-04-21 10:32:34</text>
				</view> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(opt) {
			this.order_id=opt.order_id
			this.getOrder_detail()
		},
		data() {
			return {
				order_id:'',
				orderD:{},
			};
		},
		methods:{
			getOrder_detail() {
				this.$api.order_detail({order_id:this.order_id}).then(res=>{
					console.log(res)
					this.orderD=res.data.data
				})
			},
			copy() {
				this.$tool.copy(this.orderD.order_sn)
			}
		}
	}
</script>

<style lang="scss" scoped>
.topBox {
	height: 324rpx;
	background: url(@/static/image/my/orderD.png) no-repeat center;
	background-size: 100% 100%;
}
</style>
